const app = getApp()
Page({
  loadingHidden: false,
  data: {
    infodata:[],
    id:"",
    username:"",
    ishave:false
  },
  //获取识别详情
  getrRcognitionInfo: function (options) {
    var that = this;
    var openid = app.globalData.openid;
    var link = app.globalData.schlink;
    var id = options;
    wx.request({
      url: getApp().globalData.baseUrl + 'getrRcognitionInfo',
      data: {
        openid: openid,
        link: link,
        id: id
      },
      method: "get",
      header: {
        "Content-Type": "application/x-www-form-urlencoded"
      },
      success: function (res) {
        if (res.data.result == 200) {
          if (res.data.data) {
            var infodata = res.data.data;
            var path = infodata.path;
            infodata.path = path.replace(/[\r\n]/g, "");
            var ishave = true;
          }
          that.setData({
            infodata: infodata,
            ishave: ishave,
            loadingHidden: true,
           });
        }
      }
    })
  },
  onLoad: function (options) {
    wx.setNavigationBarTitle({
      title: "识别记录"
    })
    var id = options.id;
    var that=this;
    if (getApp().globalData.bindInfo) {
      that.setData({
        username: getApp().globalData.bindInfo.user_name
      });
    }
    this.getrRcognitionInfo(id);
  },
  onReady: function () {
  },
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})